package com.jame.factory.simple_factory;

/**
 * @author : Jame
 * @date : 2022-04-15 14:48
 * 简单工厂
 **/
public class SimpleFactory {


    public Drinks createDrinks(String name){
        if(name.equals("coffee")){
            return new Coffee();
        }else if(name.equals("coke")){
            return new Coke();
        }
        return null;
    }

}
